package com.yang.mall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yang.mall.entity.LiveOrderLine;
import com.yang.mall.mapper.LiveOrderLineMapper;
import com.yang.mall.service.ILiveOrderLineService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单明细表 服务实现类
 * </p>
 *
 * @author kadorlin
 * @since 2022-10-21
 */
@Service
public class LiveOrderLineServiceImpl extends ServiceImpl<LiveOrderLineMapper, LiveOrderLine> implements ILiveOrderLineService {

    /**
     * 根据订单id查询
     *
     * @param orderId
     * @return
     */
    @Override
    public List<LiveOrderLine> findByOrderId(Long orderId) {
        QueryWrapper<LiveOrderLine> wrapper = new QueryWrapper<>();
        wrapper.lambda().eq(LiveOrderLine::getOrderId,orderId);
        return baseMapper.selectList(wrapper);
    }
}
